package com.blackitheima3.polymorphic;
//多态编译与运行
public class TestFuandZi {
    public static void main(String[] args) {
        Fu f=new Zi();
        System.out.println(f.a);//编译看左(父),运行看左(父)
        f.show();//编译看左(父),运行看右(子)

    }
}
class Fu{
    int a=10;
    public void show (){
        System.out.println("Fu类");
    }
}
class Zi extends Fu{
    int a=20;
    public void show(){
        System.out.println("子类");
    }
}
